package com.zj.classwork;
import java.util.Arrays;
import java.util.Scanner;
public class ClassWork22 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String value=input.next();
        char[]arr=value.toCharArray();
        System.out.print("原字符数列：");
        for(int i=0;i<arr.length;i++)
        {
            System.out.print(arr[i]+"\t");
        }
        System.out.println();
        Arrays.sort(arr);
        System.out.print("升序排序后：");
        for (int j=0;j<arr.length;j++)
        {
            System.out.print(arr[j]+"\t");
        }
        System.out.println();
        System.out.print("逆序输出为：");
        for (int u=arr.length-1;u>=0;u--)
        {
            System.out.print(arr[u]+"\t");
        }



    }
}
